package com.sdry.common;

/**
 * 通用命名
 * @author chenBin
 * @date 2020-3-2 14:08:37
 * @version 1.0
 */
public enum BaseTypeEnum {
    WZZ("WZZ","万方中转区"),
    FJ("FJ","分拣区"),
    QCL("QCL","前处理区"),
    YG("YG","预挂线"),
    PT("PT","喷涂线"),
    PQ("PQ","喷漆线（二遍漆）"),
    CP("CP","成品链存放区"),
    CPK("CPK","成品库")
    ;

    private String code;
    private String name;
    BaseTypeEnum(String code, String name){
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public static String getNameByCode(String code){
        for (BaseTypeEnum value : values()) {
            if(value.code.equals(code)){
                return value.name;
            }
        }
        //没有则返回null；
        return "null";
    }
}
